// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.0
// Generated from file `Interface.ice'

#include <Interface.h>
#include <Ice/LocalException.h>
#include <Ice/ObjectFactory.h>
#include <Ice/BasicStream.h>
#include <IceUtil/Iterator.h>
#include <IceUtil/ScopedArray.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 303
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 0
#       error Ice patch level mismatch!
#   endif
#endif

static const ::std::string __PPIce__SinglConSql__ExecSql_name = "ExecSql";

static const ::std::string __PPIce__NewBankProxy__NewBankAccountInfoServer_name = "NewBankAccountInfoServer";

static const ::std::string __PPIce__NewBankProxy__NewBankCongealThawServer_name = "NewBankCongealThawServer";

static const ::std::string __PPIce__NewBankProxy__NewBankUserMoneyquantumGet_name = "NewBankUserMoneyquantumGet";

static const ::std::string __PPIce__NewBankProxy__NewBankAddGoldTest_name = "NewBankAddGoldTest";

static const ::std::string __PPIce__NewBankProxy__NewBankServerActionB_name = "NewBankServerActionB";

static const ::std::string __PPIce__NewBankProxy__NewBankServerActionSequenceB_name = "NewBankServerActionSequenceB";

::Ice::Object* IceInternal::upCast(::PPIce::SinglConSql* p) { return p; }
::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::PPIce::SinglConSql* p) { return p; }

::Ice::Object* IceInternal::upCast(::PPIce::C* p) { return p; }
::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::PPIce::C* p) { return p; }

::Ice::Object* IceInternal::upCast(::PPIce::NewBankProxy* p) { return p; }
::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::PPIce::NewBankProxy* p) { return p; }

void
PPIce::__read(::IceInternal::BasicStream* __is, ::PPIce::SinglConSqlPrx& v)
{
    ::Ice::ObjectPrx proxy;
    __is->read(proxy);
    if(!proxy)
    {
        v = 0;
    }
    else
    {
        v = new ::IceProxy::PPIce::SinglConSql;
        v->__copyFrom(proxy);
    }
}

void
PPIce::__read(::IceInternal::BasicStream* __is, ::PPIce::CPrx& v)
{
    ::Ice::ObjectPrx proxy;
    __is->read(proxy);
    if(!proxy)
    {
        v = 0;
    }
    else
    {
        v = new ::IceProxy::PPIce::C;
        v->__copyFrom(proxy);
    }
}

void
PPIce::__read(::IceInternal::BasicStream* __is, ::PPIce::NewBankProxyPrx& v)
{
    ::Ice::ObjectPrx proxy;
    __is->read(proxy);
    if(!proxy)
    {
        v = 0;
    }
    else
    {
        v = new ::IceProxy::PPIce::NewBankProxy;
        v->__copyFrom(proxy);
    }
}

PPIce::RequestCanceledException::~RequestCanceledException() throw()
{
}

static const char* __PPIce__RequestCanceledException_name = "PPIce::RequestCanceledException";

::std::string
PPIce::RequestCanceledException::ice_name() const
{
    return __PPIce__RequestCanceledException_name;
}

::Ice::Exception*
PPIce::RequestCanceledException::ice_clone() const
{
    return new RequestCanceledException(*this);
}

void
PPIce::RequestCanceledException::ice_throw() const
{
    throw *this;
}

void
PPIce::RequestCanceledException::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(::std::string("::PPIce::RequestCanceledException"), false);
    __os->startWriteSlice();
    __os->endWriteSlice();
}

void
PPIce::RequestCanceledException::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->read(myId, false);
    }
    __is->startReadSlice();
    __is->endReadSlice();
}

void
PPIce::RequestCanceledException::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "exception PPIce::RequestCanceledException was not generated with stream support";
    throw ex;
}

void
PPIce::RequestCanceledException::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "exception PPIce::RequestCanceledException was not generated with stream support";
    throw ex;
}

struct __F__PPIce__RequestCanceledException : public ::IceInternal::UserExceptionFactory
{
    virtual void
    createAndThrow()
    {
        throw ::PPIce::RequestCanceledException();
    }
};

static ::IceInternal::UserExceptionFactoryPtr __F__PPIce__RequestCanceledException__Ptr = new __F__PPIce__RequestCanceledException;

const ::IceInternal::UserExceptionFactoryPtr&
PPIce::RequestCanceledException::ice_factory()
{
    return __F__PPIce__RequestCanceledException__Ptr;
}

class __F__PPIce__RequestCanceledException__Init
{
public:

    __F__PPIce__RequestCanceledException__Init()
    {
        ::IceInternal::factoryTable->addExceptionFactory("::PPIce::RequestCanceledException", ::PPIce::RequestCanceledException::ice_factory());
    }

    ~__F__PPIce__RequestCanceledException__Init()
    {
        ::IceInternal::factoryTable->removeExceptionFactory("::PPIce::RequestCanceledException");
    }
};

static __F__PPIce__RequestCanceledException__Init __F__PPIce__RequestCanceledException__i;

#ifdef __APPLE__
extern "C" { void __F__PPIce__RequestCanceledException__initializer() {} }
#endif

void
PPIce::__writeStringDict(::IceInternal::BasicStream* __os, const ::PPIce::StringDict& v)
{
    __os->writeSize(::Ice::Int(v.size()));
    ::PPIce::StringDict::const_iterator p;
    for(p = v.begin(); p != v.end(); ++p)
    {
        __os->write(p->first);
        __os->write(p->second);
    }
}

void
PPIce::__readStringDict(::IceInternal::BasicStream* __is, ::PPIce::StringDict& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    while(sz--)
    {
        ::std::pair<const  ::std::string, ::std::string> pair;
        __is->read(const_cast< ::std::string&>(pair.first));
        ::PPIce::StringDict::iterator __i = v.insert(v.end(), pair);
        __is->read(__i->second);
    }
}

void
PPIce::__writeSequenceStringDict(::IceInternal::BasicStream* __os, const ::PPIce::StringDict* begin, const ::PPIce::StringDict* end)
{
    ::Ice::Int size = static_cast< ::Ice::Int>(end - begin);
    __os->writeSize(size);
    for(int i = 0; i < size; ++i)
    {
        ::PPIce::__writeStringDict(__os, begin[i]);
    }
}

void
PPIce::__readSequenceStringDict(::IceInternal::BasicStream* __is, ::PPIce::SequenceStringDict& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    __is->startSeq(sz, 1);
    v.resize(sz);
    for(int i = 0; i < sz; ++i)
    {
        ::PPIce::__readStringDict(__is, v[i]);
        __is->checkSeq();
        __is->endElement();
    }
    __is->endSeq(sz);
}

void
PPIce::__writeResultA(::IceInternal::BasicStream* __os, const ::PPIce::ResultA& v)
{
    __os->writeSize(::Ice::Int(v.size()));
    ::PPIce::ResultA::const_iterator p;
    for(p = v.begin(); p != v.end(); ++p)
    {
        __os->write(p->first);
        __os->write(p->second);
    }
}

void
PPIce::__readResultA(::IceInternal::BasicStream* __is, ::PPIce::ResultA& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    while(sz--)
    {
        ::std::pair<const  ::std::string, ::std::string> pair;
        __is->read(const_cast< ::std::string&>(pair.first));
        ::PPIce::ResultA::iterator __i = v.insert(v.end(), pair);
        __is->read(__i->second);
    }
}

void
PPIce::__writeResultB(::IceInternal::BasicStream* __os, const ::PPIce::ResultB& v)
{
    __os->writeSize(::Ice::Int(v.size()));
    ::PPIce::ResultB::const_iterator p;
    for(p = v.begin(); p != v.end(); ++p)
    {
        __os->write(p->first);
        ::PPIce::__writeResultA(__os, p->second);
    }
}

void
PPIce::__readResultB(::IceInternal::BasicStream* __is, ::PPIce::ResultB& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    while(sz--)
    {
        ::std::pair<const  ::Ice::Int, ::PPIce::ResultA> pair;
        __is->read(const_cast< ::Ice::Int&>(pair.first));
        ::PPIce::ResultB::iterator __i = v.insert(v.end(), pair);
        ::PPIce::__readResultA(__is, __i->second);
    }
}

void
PPIce::__writeResultC(::IceInternal::BasicStream* __os, const ::PPIce::ResultC& v)
{
    __os->writeSize(::Ice::Int(v.size()));
    ::PPIce::ResultC::const_iterator p;
    for(p = v.begin(); p != v.end(); ++p)
    {
        __os->write(p->first);
        ::PPIce::__writeResultB(__os, p->second);
    }
}

void
PPIce::__readResultC(::IceInternal::BasicStream* __is, ::PPIce::ResultC& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    while(sz--)
    {
        ::std::pair<const  ::std::string, ::PPIce::ResultB> pair;
        __is->read(const_cast< ::std::string&>(pair.first));
        ::PPIce::ResultC::iterator __i = v.insert(v.end(), pair);
        ::PPIce::__readResultB(__is, __i->second);
    }
}

void
PPIce::__writeSequenceResultB(::IceInternal::BasicStream* __os, const ::PPIce::ResultB* begin, const ::PPIce::ResultB* end)
{
    ::Ice::Int size = static_cast< ::Ice::Int>(end - begin);
    __os->writeSize(size);
    for(int i = 0; i < size; ++i)
    {
        ::PPIce::__writeResultB(__os, begin[i]);
    }
}

void
PPIce::__readSequenceResultB(::IceInternal::BasicStream* __is, ::PPIce::SequenceResultB& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    __is->startSeq(sz, 1);
    v.resize(sz);
    for(int i = 0; i < sz; ++i)
    {
        ::PPIce::__readResultB(__is, v[i]);
        __is->checkSeq();
        __is->endElement();
    }
    __is->endSeq(sz);
}

bool
PPIce::Structure::operator==(const Structure& __rhs) const
{
    if(this == &__rhs)
    {
        return true;
    }
    if(name != __rhs.name)
    {
        return false;
    }
    if(value != __rhs.value)
    {
        return false;
    }
    return true;
}

bool
PPIce::Structure::operator<(const Structure& __rhs) const
{
    if(this == &__rhs)
    {
        return false;
    }
    if(name < __rhs.name)
    {
        return true;
    }
    else if(__rhs.name < name)
    {
        return false;
    }
    if(value < __rhs.value)
    {
        return true;
    }
    else if(__rhs.value < value)
    {
        return false;
    }
    return false;
}

void
PPIce::Structure::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(name);
    ::PPIce::__writeStringDict(__os, value);
}

void
PPIce::Structure::__read(::IceInternal::BasicStream* __is)
{
    __is->read(name);
    ::PPIce::__readStringDict(__is, value);
}

void
PPIce::__writeStructureSeq(::IceInternal::BasicStream* __os, const ::PPIce::Structure* begin, const ::PPIce::Structure* end)
{
    ::Ice::Int size = static_cast< ::Ice::Int>(end - begin);
    __os->writeSize(size);
    for(int i = 0; i < size; ++i)
    {
        begin[i].__write(__os);
    }
}

void
PPIce::__readStructureSeq(::IceInternal::BasicStream* __is, ::PPIce::StructureSeq& v)
{
    ::Ice::Int sz;
    __is->readSize(sz);
    __is->startSeq(sz, 2);
    v.resize(sz);
    for(int i = 0; i < sz; ++i)
    {
        v[i].__read(__is);
        __is->checkSeq();
        __is->endElement();
    }
    __is->endSeq(sz);
}

bool
PPIce::AMI_SinglConSql_ExecSql::__invoke(const ::PPIce::SinglConSqlPrx& __prx, const ::std::string& ClientSql, const ::std::string& Ip, const ::std::string& DbName, const ::Ice::Context* __ctx)
{
    __acquireCallback(__prx);
    try
    {
        __prx->__checkTwowayOnly("ExecSql");
        __prepare(__prx, __PPIce__SinglConSql__ExecSql_name, ::Ice::Normal, __ctx);
        __os->write(ClientSql);
        __os->write(Ip);
        __os->write(DbName);
        __os->endWriteEncaps();
        return __send();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __releaseCallback(__ex);
        return false;
    }
}

void
PPIce::AMI_SinglConSql_ExecSql::__response(bool __ok)
{
    try
    {
        if(!__ok)
        {
            try
            {
                __throwUserException();
            }
            catch(const ::PPIce::RequestCanceledException& __ex)
            {
                __exception(__ex);
            }
            catch(const ::Ice::UserException& __ex)
            {
                throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
            }
            return;
        }
        __is->startReadEncaps();
        __is->endReadEncaps();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __finished(__ex);
        return;
    }
    ice_response();
    __releaseCallback();
}

IceAsync::PPIce::AMD_SinglConSql_ExecSql::AMD_SinglConSql_ExecSql(::IceInternal::Incoming& in) :
    ::IceInternal::IncomingAsync(in)
{
}

void
IceAsync::PPIce::AMD_SinglConSql_ExecSql::ice_response()
{
    if(__validateResponse(true))
    {
        __response(true);
    }
}

void
IceAsync::PPIce::AMD_SinglConSql_ExecSql::ice_exception(const ::std::exception& ex)
{
    if(const ::PPIce::RequestCanceledException* __ex = dynamic_cast<const ::PPIce::RequestCanceledException*>(&ex))
    {
        if(__validateResponse(false))
        {
            __os()->write(*__ex);
            __response(false);
        }
    }
    else
    {
        if(__validateException(ex))
        {
            __exception(ex);
        }
    }
}

void
IceAsync::PPIce::AMD_SinglConSql_ExecSql::ice_exception()
{
    if(__validateException())
    {
        __exception();
    }
}

void
IceProxy::PPIce::SinglConSql::ExecSql(const ::std::string& ClientSql, const ::std::string& Ip, const ::std::string& DbName, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __checkTwowayOnly(__PPIce__SinglConSql__ExecSql_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::SinglConSql* __del = dynamic_cast< ::IceDelegate::PPIce::SinglConSql*>(__delBase.get());
            __del->ExecSql(ClientSql, Ip, DbName, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

bool
IceProxy::PPIce::SinglConSql::ExecSql_async(const ::PPIce::AMI_SinglConSql_ExecSqlPtr& __cb, const ::std::string& ClientSql, const ::std::string& Ip, const ::std::string& DbName)
{
    return __cb->__invoke(this, ClientSql, Ip, DbName, 0);
}

bool
IceProxy::PPIce::SinglConSql::ExecSql_async(const ::PPIce::AMI_SinglConSql_ExecSqlPtr& __cb, const ::std::string& ClientSql, const ::std::string& Ip, const ::std::string& DbName, const ::Ice::Context& __ctx)
{
    return __cb->__invoke(this, ClientSql, Ip, DbName, &__ctx);
}

const ::std::string&
IceProxy::PPIce::SinglConSql::ice_staticId()
{
    return ::PPIce::SinglConSql::ice_staticId();
}

::IceInternal::Handle< ::IceDelegateM::Ice::Object>
IceProxy::PPIce::SinglConSql::__createDelegateM()
{
    return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::PPIce::SinglConSql);
}

::IceInternal::Handle< ::IceDelegateD::Ice::Object>
IceProxy::PPIce::SinglConSql::__createDelegateD()
{
    return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::PPIce::SinglConSql);
}

::IceProxy::Ice::Object*
IceProxy::PPIce::SinglConSql::__newInstance() const
{
    return new SinglConSql;
}

const ::std::string&
IceProxy::PPIce::C::ice_staticId()
{
    return ::PPIce::C::ice_staticId();
}

::IceInternal::Handle< ::IceDelegateM::Ice::Object>
IceProxy::PPIce::C::__createDelegateM()
{
    return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::PPIce::C);
}

::IceInternal::Handle< ::IceDelegateD::Ice::Object>
IceProxy::PPIce::C::__createDelegateD()
{
    return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::PPIce::C);
}

::IceProxy::Ice::Object*
IceProxy::PPIce::C::__newInstance() const
{
    return new C;
}

::PPIce::ResultA
IceProxy::PPIce::NewBankProxy::NewBankAccountInfoServer(const ::std::string& userid, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __checkTwowayOnly(__PPIce__NewBankProxy__NewBankAccountInfoServer_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::NewBankProxy* __del = dynamic_cast< ::IceDelegate::PPIce::NewBankProxy*>(__delBase.get());
            return __del->NewBankAccountInfoServer(userid, __ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

::PPIce::ResultA
IceProxy::PPIce::NewBankProxy::NewBankCongealThawServer(const ::std::string& userid, ::Ice::Short action, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __checkTwowayOnly(__PPIce__NewBankProxy__NewBankCongealThawServer_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::NewBankProxy* __del = dynamic_cast< ::IceDelegate::PPIce::NewBankProxy*>(__delBase.get());
            return __del->NewBankCongealThawServer(userid, action, __ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

::PPIce::ResultA
IceProxy::PPIce::NewBankProxy::NewBankUserMoneyquantumGet(const ::std::string& userid, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __checkTwowayOnly(__PPIce__NewBankProxy__NewBankUserMoneyquantumGet_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::NewBankProxy* __del = dynamic_cast< ::IceDelegate::PPIce::NewBankProxy*>(__delBase.get());
            return __del->NewBankUserMoneyquantumGet(userid, __ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::PPIce::NewBankProxy::NewBankAddGoldTest(const ::std::string& userid, ::Ice::Int gold, const ::std::string& frombanknum, const ::std::string& objid, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::NewBankProxy* __del = dynamic_cast< ::IceDelegate::PPIce::NewBankProxy*>(__delBase.get());
            __del->NewBankAddGoldTest(userid, gold, frombanknum, objid, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

::PPIce::ResultC
IceProxy::PPIce::NewBankProxy::NewBankServerActionB(const ::PPIce::ResultB& InputArray, const ::std::string& frombanknum, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __checkTwowayOnly(__PPIce__NewBankProxy__NewBankServerActionB_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::NewBankProxy* __del = dynamic_cast< ::IceDelegate::PPIce::NewBankProxy*>(__delBase.get());
            return __del->NewBankServerActionB(InputArray, frombanknum, __ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

::PPIce::ResultC
IceProxy::PPIce::NewBankProxy::NewBankServerActionSequenceB(const ::PPIce::SequenceResultB& SequenceInputArray, const ::std::string& frombanknum, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
            __checkTwowayOnly(__PPIce__NewBankProxy__NewBankServerActionSequenceB_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::PPIce::NewBankProxy* __del = dynamic_cast< ::IceDelegate::PPIce::NewBankProxy*>(__delBase.get());
            return __del->NewBankServerActionSequenceB(SequenceInputArray, frombanknum, __ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

const ::std::string&
IceProxy::PPIce::NewBankProxy::ice_staticId()
{
    return ::PPIce::NewBankProxy::ice_staticId();
}

::IceInternal::Handle< ::IceDelegateM::Ice::Object>
IceProxy::PPIce::NewBankProxy::__createDelegateM()
{
    return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::PPIce::NewBankProxy);
}

::IceInternal::Handle< ::IceDelegateD::Ice::Object>
IceProxy::PPIce::NewBankProxy::__createDelegateD()
{
    return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::PPIce::NewBankProxy);
}

::IceProxy::Ice::Object*
IceProxy::PPIce::NewBankProxy::__newInstance() const
{
    return new NewBankProxy;
}

void
IceDelegateM::PPIce::SinglConSql::ExecSql(const ::std::string& ClientSql, const ::std::string& Ip, const ::std::string& DbName, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__SinglConSql__ExecSql_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(ClientSql);
        __os->write(Ip);
        __os->write(DbName);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::PPIce::RequestCanceledException&)
            {
                throw;
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        __is->endReadEncaps();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

::PPIce::ResultA
IceDelegateM::PPIce::NewBankProxy::NewBankAccountInfoServer(const ::std::string& userid, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__NewBankProxy__NewBankAccountInfoServer_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(userid);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::PPIce::ResultA __ret;
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        ::PPIce::__readResultA(__is, __ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

::PPIce::ResultA
IceDelegateM::PPIce::NewBankProxy::NewBankCongealThawServer(const ::std::string& userid, ::Ice::Short action, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__NewBankProxy__NewBankCongealThawServer_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(userid);
        __os->write(action);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::PPIce::ResultA __ret;
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        ::PPIce::__readResultA(__is, __ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

::PPIce::ResultA
IceDelegateM::PPIce::NewBankProxy::NewBankUserMoneyquantumGet(const ::std::string& userid, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__NewBankProxy__NewBankUserMoneyquantumGet_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(userid);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::PPIce::ResultA __ret;
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        ::PPIce::__readResultA(__is, __ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateM::PPIce::NewBankProxy::NewBankAddGoldTest(const ::std::string& userid, ::Ice::Int gold, const ::std::string& frombanknum, const ::std::string& objid, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__NewBankProxy__NewBankAddGoldTest_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(userid);
        __os->write(gold);
        __os->write(frombanknum);
        __os->write(objid);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

::PPIce::ResultC
IceDelegateM::PPIce::NewBankProxy::NewBankServerActionB(const ::PPIce::ResultB& InputArray, const ::std::string& frombanknum, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__NewBankProxy__NewBankServerActionB_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        ::PPIce::__writeResultB(__os, InputArray);
        __os->write(frombanknum);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::PPIce::ResultC __ret;
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        ::PPIce::__readResultC(__is, __ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

::PPIce::ResultC
IceDelegateM::PPIce::NewBankProxy::NewBankServerActionSequenceB(const ::PPIce::SequenceResultB& SequenceInputArray, const ::std::string& frombanknum, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __PPIce__NewBankProxy__NewBankServerActionSequenceB_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        if(SequenceInputArray.size() == 0)
        {
            __os->writeSize(0);
        }
        else
        {
            ::PPIce::__writeSequenceResultB(__os, &SequenceInputArray[0], &SequenceInputArray[0] + SequenceInputArray.size());
        }
        __os->write(frombanknum);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::PPIce::ResultC __ret;
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        ::PPIce::__readResultC(__is, __ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateD::PPIce::SinglConSql::ExecSql(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Context*)
{
    throw ::Ice::CollocationOptimizationException(__FILE__, __LINE__);
}

::PPIce::ResultA
IceDelegateD::PPIce::NewBankProxy::NewBankAccountInfoServer(const ::std::string& userid, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::PPIce::ResultA& __result, const ::std::string& userid, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result),
            _m_userid(userid)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::PPIce::NewBankProxy* servant = dynamic_cast< ::PPIce::NewBankProxy*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->NewBankAccountInfoServer(_m_userid, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::PPIce::ResultA& _result;
        const ::std::string& _m_userid;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __PPIce__NewBankProxy__NewBankAccountInfoServer_name, ::Ice::Normal, __context);
    ::PPIce::ResultA __result;
    try
    {
        _DirectI __direct(__result, userid, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

::PPIce::ResultA
IceDelegateD::PPIce::NewBankProxy::NewBankCongealThawServer(const ::std::string& userid, ::Ice::Short action, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::PPIce::ResultA& __result, const ::std::string& userid, ::Ice::Short action, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result),
            _m_userid(userid),
            _m_action(action)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::PPIce::NewBankProxy* servant = dynamic_cast< ::PPIce::NewBankProxy*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->NewBankCongealThawServer(_m_userid, _m_action, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::PPIce::ResultA& _result;
        const ::std::string& _m_userid;
        ::Ice::Short _m_action;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __PPIce__NewBankProxy__NewBankCongealThawServer_name, ::Ice::Normal, __context);
    ::PPIce::ResultA __result;
    try
    {
        _DirectI __direct(__result, userid, action, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

::PPIce::ResultA
IceDelegateD::PPIce::NewBankProxy::NewBankUserMoneyquantumGet(const ::std::string& userid, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::PPIce::ResultA& __result, const ::std::string& userid, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result),
            _m_userid(userid)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::PPIce::NewBankProxy* servant = dynamic_cast< ::PPIce::NewBankProxy*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->NewBankUserMoneyquantumGet(_m_userid, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::PPIce::ResultA& _result;
        const ::std::string& _m_userid;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __PPIce__NewBankProxy__NewBankUserMoneyquantumGet_name, ::Ice::Normal, __context);
    ::PPIce::ResultA __result;
    try
    {
        _DirectI __direct(__result, userid, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

void
IceDelegateD::PPIce::NewBankProxy::NewBankAddGoldTest(const ::std::string& userid, ::Ice::Int gold, const ::std::string& frombanknum, const ::std::string& objid, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(const ::std::string& userid, ::Ice::Int gold, const ::std::string& frombanknum, const ::std::string& objid, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_userid(userid),
            _m_gold(gold),
            _m_frombanknum(frombanknum),
            _m_objid(objid)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::PPIce::NewBankProxy* servant = dynamic_cast< ::PPIce::NewBankProxy*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->NewBankAddGoldTest(_m_userid, _m_gold, _m_frombanknum, _m_objid, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        const ::std::string& _m_userid;
        ::Ice::Int _m_gold;
        const ::std::string& _m_frombanknum;
        const ::std::string& _m_objid;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __PPIce__NewBankProxy__NewBankAddGoldTest_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(userid, gold, frombanknum, objid, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

::PPIce::ResultC
IceDelegateD::PPIce::NewBankProxy::NewBankServerActionB(const ::PPIce::ResultB& InputArray, const ::std::string& frombanknum, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::PPIce::ResultC& __result, const ::PPIce::ResultB& InputArray, const ::std::string& frombanknum, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result),
            _m_InputArray(InputArray),
            _m_frombanknum(frombanknum)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::PPIce::NewBankProxy* servant = dynamic_cast< ::PPIce::NewBankProxy*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->NewBankServerActionB(_m_InputArray, _m_frombanknum, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::PPIce::ResultC& _result;
        const ::PPIce::ResultB& _m_InputArray;
        const ::std::string& _m_frombanknum;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __PPIce__NewBankProxy__NewBankServerActionB_name, ::Ice::Normal, __context);
    ::PPIce::ResultC __result;
    try
    {
        _DirectI __direct(__result, InputArray, frombanknum, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

::PPIce::ResultC
IceDelegateD::PPIce::NewBankProxy::NewBankServerActionSequenceB(const ::PPIce::SequenceResultB& SequenceInputArray, const ::std::string& frombanknum, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::PPIce::ResultC& __result, const ::PPIce::SequenceResultB& SequenceInputArray, const ::std::string& frombanknum, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result),
            _m_SequenceInputArray(SequenceInputArray),
            _m_frombanknum(frombanknum)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::PPIce::NewBankProxy* servant = dynamic_cast< ::PPIce::NewBankProxy*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->NewBankServerActionSequenceB(_m_SequenceInputArray, _m_frombanknum, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::PPIce::ResultC& _result;
        const ::PPIce::SequenceResultB& _m_SequenceInputArray;
        const ::std::string& _m_frombanknum;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __PPIce__NewBankProxy__NewBankServerActionSequenceB_name, ::Ice::Normal, __context);
    ::PPIce::ResultC __result;
    try
    {
        _DirectI __direct(__result, SequenceInputArray, frombanknum, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

::Ice::ObjectPtr
PPIce::SinglConSql::ice_clone() const
{
    throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);
    return 0; // to avoid a warning with some compilers
}

static const ::std::string __PPIce__SinglConSql_ids[2] =
{
    "::Ice::Object",
    "::PPIce::SinglConSql"
};

bool
PPIce::SinglConSql::ice_isA(const ::std::string& _s, const ::Ice::Current&) const
{
    return ::std::binary_search(__PPIce__SinglConSql_ids, __PPIce__SinglConSql_ids + 2, _s);
}

::std::vector< ::std::string>
PPIce::SinglConSql::ice_ids(const ::Ice::Current&) const
{
    return ::std::vector< ::std::string>(&__PPIce__SinglConSql_ids[0], &__PPIce__SinglConSql_ids[2]);
}

const ::std::string&
PPIce::SinglConSql::ice_id(const ::Ice::Current&) const
{
    return __PPIce__SinglConSql_ids[1];
}

const ::std::string&
PPIce::SinglConSql::ice_staticId()
{
    return __PPIce__SinglConSql_ids[1];
}

::Ice::DispatchStatus
PPIce::SinglConSql::___ExecSql(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::std::string ClientSql;
    ::std::string Ip;
    ::std::string DbName;
    __is->read(ClientSql);
    __is->read(Ip);
    __is->read(DbName);
    __is->endReadEncaps();
    ::PPIce::AMD_SinglConSql_ExecSqlPtr __cb = new IceAsync::PPIce::AMD_SinglConSql_ExecSql(__inS);
    try
    {
        ExecSql_async(__cb, ClientSql, Ip, DbName, __current);
    }
    catch(const ::std::exception& __ex)
    {
        __cb->ice_exception(__ex);
    }
    catch(...)
    {
        __cb->ice_exception();
    }
    return ::Ice::DispatchAsync;
}

static ::std::string __PPIce__SinglConSql_all[] =
{
    "ExecSql",
    "ice_id",
    "ice_ids",
    "ice_isA",
    "ice_ping"
};

::Ice::DispatchStatus
PPIce::SinglConSql::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
    ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__PPIce__SinglConSql_all, __PPIce__SinglConSql_all + 5, current.operation);
    if(r.first == r.second)
    {
        throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
    }

    switch(r.first - __PPIce__SinglConSql_all)
    {
        case 0:
        {
            return ___ExecSql(in, current);
        }
        case 1:
        {
            return ___ice_id(in, current);
        }
        case 2:
        {
            return ___ice_ids(in, current);
        }
        case 3:
        {
            return ___ice_isA(in, current);
        }
        case 4:
        {
            return ___ice_ping(in, current);
        }
    }

    assert(false);
    throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}

void
PPIce::SinglConSql::__write(::IceInternal::BasicStream* __os) const
{
    __os->writeTypeId(ice_staticId());
    __os->startWriteSlice();
    __os->endWriteSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__write(__os);
#else
    ::Ice::Object::__write(__os);
#endif
}

void
PPIce::SinglConSql::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->readTypeId(myId);
    }
    __is->startReadSlice();
    __is->endReadSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__read(__is, true);
#else
    ::Ice::Object::__read(__is, true);
#endif
}

void
PPIce::SinglConSql::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type PPIce::SinglConSql was not generated with stream support";
    throw ex;
}

void
PPIce::SinglConSql::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type PPIce::SinglConSql was not generated with stream support";
    throw ex;
}

void 
PPIce::__patch__SinglConSqlPtr(void* __addr, ::Ice::ObjectPtr& v)
{
    ::PPIce::SinglConSqlPtr* p = static_cast< ::PPIce::SinglConSqlPtr*>(__addr);
    assert(p);
    *p = ::PPIce::SinglConSqlPtr::dynamicCast(v);
    if(v && !*p)
    {
        IceInternal::Ex::throwUOE(::PPIce::SinglConSql::ice_staticId(), v->ice_id());
    }
}

bool
PPIce::operator==(const ::PPIce::SinglConSql& l, const ::PPIce::SinglConSql& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

bool
PPIce::operator<(const ::PPIce::SinglConSql& l, const ::PPIce::SinglConSql& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

PPIce::C::C(const ::PPIce::Structure& __ice_s) :
    s(__ice_s)
{
}

::Ice::ObjectPtr
PPIce::C::ice_clone() const
{
    ::PPIce::CPtr __p = new ::PPIce::C(*this);
    return __p;
}

static const ::std::string __PPIce__C_ids[2] =
{
    "::Ice::Object",
    "::PPIce::C"
};

bool
PPIce::C::ice_isA(const ::std::string& _s, const ::Ice::Current&) const
{
    return ::std::binary_search(__PPIce__C_ids, __PPIce__C_ids + 2, _s);
}

::std::vector< ::std::string>
PPIce::C::ice_ids(const ::Ice::Current&) const
{
    return ::std::vector< ::std::string>(&__PPIce__C_ids[0], &__PPIce__C_ids[2]);
}

const ::std::string&
PPIce::C::ice_id(const ::Ice::Current&) const
{
    return __PPIce__C_ids[1];
}

const ::std::string&
PPIce::C::ice_staticId()
{
    return __PPIce__C_ids[1];
}

void
PPIce::C::__write(::IceInternal::BasicStream* __os) const
{
    __os->writeTypeId(ice_staticId());
    __os->startWriteSlice();
    s.__write(__os);
    __os->endWriteSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__write(__os);
#else
    ::Ice::Object::__write(__os);
#endif
}

void
PPIce::C::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->readTypeId(myId);
    }
    __is->startReadSlice();
    s.__read(__is);
    __is->endReadSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__read(__is, true);
#else
    ::Ice::Object::__read(__is, true);
#endif
}

void
PPIce::C::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type PPIce::C was not generated with stream support";
    throw ex;
}

void
PPIce::C::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type PPIce::C was not generated with stream support";
    throw ex;
}

class __F__PPIce__C : public ::Ice::ObjectFactory
{
public:

    virtual ::Ice::ObjectPtr
    create(const ::std::string& type)
    {
        assert(type == ::PPIce::C::ice_staticId());
        return new ::PPIce::C;
    }

    virtual void
    destroy()
    {
    }
};

static ::Ice::ObjectFactoryPtr __F__PPIce__C_Ptr = new __F__PPIce__C;

const ::Ice::ObjectFactoryPtr&
PPIce::C::ice_factory()
{
    return __F__PPIce__C_Ptr;
}

class __F__PPIce__C__Init
{
public:

    __F__PPIce__C__Init()
    {
        ::IceInternal::factoryTable->addObjectFactory(::PPIce::C::ice_staticId(), ::PPIce::C::ice_factory());
    }

    ~__F__PPIce__C__Init()
    {
        ::IceInternal::factoryTable->removeObjectFactory(::PPIce::C::ice_staticId());
    }
};

static __F__PPIce__C__Init __F__PPIce__C__i;

#ifdef __APPLE__
extern "C" { void __F__PPIce__C__initializer() {} }
#endif

void 
PPIce::__patch__CPtr(void* __addr, ::Ice::ObjectPtr& v)
{
    ::PPIce::CPtr* p = static_cast< ::PPIce::CPtr*>(__addr);
    assert(p);
    *p = ::PPIce::CPtr::dynamicCast(v);
    if(v && !*p)
    {
        IceInternal::Ex::throwUOE(::PPIce::C::ice_staticId(), v->ice_id());
    }
}

bool
PPIce::operator==(const ::PPIce::C& l, const ::PPIce::C& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

bool
PPIce::operator<(const ::PPIce::C& l, const ::PPIce::C& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

::Ice::ObjectPtr
PPIce::NewBankProxy::ice_clone() const
{
    throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);
    return 0; // to avoid a warning with some compilers
}

static const ::std::string __PPIce__NewBankProxy_ids[2] =
{
    "::Ice::Object",
    "::PPIce::NewBankProxy"
};

bool
PPIce::NewBankProxy::ice_isA(const ::std::string& _s, const ::Ice::Current&) const
{
    return ::std::binary_search(__PPIce__NewBankProxy_ids, __PPIce__NewBankProxy_ids + 2, _s);
}

::std::vector< ::std::string>
PPIce::NewBankProxy::ice_ids(const ::Ice::Current&) const
{
    return ::std::vector< ::std::string>(&__PPIce__NewBankProxy_ids[0], &__PPIce__NewBankProxy_ids[2]);
}

const ::std::string&
PPIce::NewBankProxy::ice_id(const ::Ice::Current&) const
{
    return __PPIce__NewBankProxy_ids[1];
}

const ::std::string&
PPIce::NewBankProxy::ice_staticId()
{
    return __PPIce__NewBankProxy_ids[1];
}

::Ice::DispatchStatus
PPIce::NewBankProxy::___NewBankAccountInfoServer(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::std::string userid;
    __is->read(userid);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::PPIce::ResultA __ret = NewBankAccountInfoServer(userid, __current);
    ::PPIce::__writeResultA(__os, __ret);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
PPIce::NewBankProxy::___NewBankCongealThawServer(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::std::string userid;
    ::Ice::Short action;
    __is->read(userid);
    __is->read(action);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::PPIce::ResultA __ret = NewBankCongealThawServer(userid, action, __current);
    ::PPIce::__writeResultA(__os, __ret);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
PPIce::NewBankProxy::___NewBankUserMoneyquantumGet(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::std::string userid;
    __is->read(userid);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::PPIce::ResultA __ret = NewBankUserMoneyquantumGet(userid, __current);
    ::PPIce::__writeResultA(__os, __ret);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
PPIce::NewBankProxy::___NewBankAddGoldTest(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::std::string userid;
    ::Ice::Int gold;
    ::std::string frombanknum;
    ::std::string objid;
    __is->read(userid);
    __is->read(gold);
    __is->read(frombanknum);
    __is->read(objid);
    __is->endReadEncaps();
    NewBankAddGoldTest(userid, gold, frombanknum, objid, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
PPIce::NewBankProxy::___NewBankServerActionB(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::PPIce::ResultB InputArray;
    ::std::string frombanknum;
    ::PPIce::__readResultB(__is, InputArray);
    __is->read(frombanknum);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::PPIce::ResultC __ret = NewBankServerActionB(InputArray, frombanknum, __current);
    ::PPIce::__writeResultC(__os, __ret);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
PPIce::NewBankProxy::___NewBankServerActionSequenceB(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::PPIce::SequenceResultB SequenceInputArray;
    ::std::string frombanknum;
    ::PPIce::__readSequenceResultB(__is, SequenceInputArray);
    __is->read(frombanknum);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::PPIce::ResultC __ret = NewBankServerActionSequenceB(SequenceInputArray, frombanknum, __current);
    ::PPIce::__writeResultC(__os, __ret);
    return ::Ice::DispatchOK;
}

static ::std::string __PPIce__NewBankProxy_all[] =
{
    "NewBankAccountInfoServer",
    "NewBankAddGoldTest",
    "NewBankCongealThawServer",
    "NewBankServerActionB",
    "NewBankServerActionSequenceB",
    "NewBankUserMoneyquantumGet",
    "ice_id",
    "ice_ids",
    "ice_isA",
    "ice_ping"
};

::Ice::DispatchStatus
PPIce::NewBankProxy::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
    ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__PPIce__NewBankProxy_all, __PPIce__NewBankProxy_all + 10, current.operation);
    if(r.first == r.second)
    {
        throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
    }

    switch(r.first - __PPIce__NewBankProxy_all)
    {
        case 0:
        {
            return ___NewBankAccountInfoServer(in, current);
        }
        case 1:
        {
            return ___NewBankAddGoldTest(in, current);
        }
        case 2:
        {
            return ___NewBankCongealThawServer(in, current);
        }
        case 3:
        {
            return ___NewBankServerActionB(in, current);
        }
        case 4:
        {
            return ___NewBankServerActionSequenceB(in, current);
        }
        case 5:
        {
            return ___NewBankUserMoneyquantumGet(in, current);
        }
        case 6:
        {
            return ___ice_id(in, current);
        }
        case 7:
        {
            return ___ice_ids(in, current);
        }
        case 8:
        {
            return ___ice_isA(in, current);
        }
        case 9:
        {
            return ___ice_ping(in, current);
        }
    }

    assert(false);
    throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}

void
PPIce::NewBankProxy::__write(::IceInternal::BasicStream* __os) const
{
    __os->writeTypeId(ice_staticId());
    __os->startWriteSlice();
    __os->endWriteSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__write(__os);
#else
    ::Ice::Object::__write(__os);
#endif
}

void
PPIce::NewBankProxy::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->readTypeId(myId);
    }
    __is->startReadSlice();
    __is->endReadSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__read(__is, true);
#else
    ::Ice::Object::__read(__is, true);
#endif
}

void
PPIce::NewBankProxy::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type PPIce::NewBankProxy was not generated with stream support";
    throw ex;
}

void
PPIce::NewBankProxy::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type PPIce::NewBankProxy was not generated with stream support";
    throw ex;
}

void 
PPIce::__patch__NewBankProxyPtr(void* __addr, ::Ice::ObjectPtr& v)
{
    ::PPIce::NewBankProxyPtr* p = static_cast< ::PPIce::NewBankProxyPtr*>(__addr);
    assert(p);
    *p = ::PPIce::NewBankProxyPtr::dynamicCast(v);
    if(v && !*p)
    {
        IceInternal::Ex::throwUOE(::PPIce::NewBankProxy::ice_staticId(), v->ice_id());
    }
}

bool
PPIce::operator==(const ::PPIce::NewBankProxy& l, const ::PPIce::NewBankProxy& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

bool
PPIce::operator<(const ::PPIce::NewBankProxy& l, const ::PPIce::NewBankProxy& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}
